#!/bin/sh

#remove the active ip from eth0:#

ETH_DEV=dc0
DACONF=/usr/local/directadmin/conf/directadmin.conf
if [ `cat $DACONF | grep -c ethernet_dev` -gt "0" ]
then
        ETH_DEV=`cat $DACONF | grep ethernet_dev | cut -d= -f2 | cut -d: -f1`
fi


if [ $# -ne "1" ] # we need the ip to delete
then
        echo "Usage: $0 <ip>";
        exit 1;
fi

		
/sbin/ifconfig $ETH_DEV inet $1	-alias
#/sbin/route delete -host $1
exit 0
